<template>
  <div id="app">
    <van-nav-bar
      title="demo展示"
      :fixed="true"
      :safe-area-inset-top="true"
      :placeholder="true"
    />
    <van-button type="primary" @click="testFunction">主要按钮</van-button>
  </div>
</template>

<script>
export default {
  name: 'App',
  methods: {
    testFunction(){
      window.AndroidFunction.showLog("互通测试！");
    },
    initFunction(){
      window['doBack'] = function(){
         window.AndroidFunction.showLog("点击了返回按钮！");
      }
    }
  },
  mounted(){
    this.initFunction()
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
</style>
